{% load blog_tags %}
{# templates>blog>base.html #}
{#在`settings.py`中的`TEMPLATES/OPTIONS`#}
{#添加`'builtins':['django.templatetags.static']#}
{#{% load static %}#}
{#在settings中设置后模板中就不用手动添加了#}
<!DOCTYPE html>
<html lang="en">
<head>
  <title>{% block title %}{% endblock %}</title>
    <!-- 引入monikai.css -->
    <link rel="stylesheet" href="{% static 'css/monokai.css' %}">
  <link href="{% static "css/blog.css" %}" rel="stylesheet">
</head>
<body>
  <div id="content">
    {% block content %}
    {% endblock %}
  </div>
  <div id="sidebar">
    <h2><a href="{% url "blog:post_list" %}">阿熊~博客</a></h2>
      <p>欢迎进入博客</p>
      <p> 帖子{% total_posts %}篇</p>
  <p><a href="{% url "blog:post_search" %}">搜索帖子</a></p>
       <h3>最新帖子</h3>
      {% show_latest_posts %}
      <h3>最近活跃的帖子</h3>
      {% get_most_commented_posts as most_commented_post %}
    <u1>
        {% for post in most_commented_post %}
        <li>
        <a href='{{ post.get_absolute_url }}'>{{ post.title }} </a>
        </li>
        {% endfor %}
    </u1>
  </div>
</body>
</html>